﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using App.Data;
using App.Core.Extensions;
using System.Data;

public partial class Pages_Private_Fovorites : BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        BindPageInfo();
        if (!IsPostBack)
        {
            BindFavoriteList();
        }
    }
    protected void BindPageInfo()
    {
        Page.Title = WebUtil.GetPageTitle(h4Heading.InnerHtml);
    }
    protected void BindFavoriteList()
    {
        UtilityDAO dao = new UtilityDAO();
        App.Data.DbParameter[] parameters = new[] { new App.Data.DbParameter("@UserID", SessionCache.CurrentUser.ID) };
        DataSet ds = dao.GetDataSet(AppSQL.GET_USER_FAVORITES, parameters, false);
        ucProjectList.DataSource = ds.Tables[0];
        ucProjectList.EditLink = AppConstants.Pages.PROJECT_DETAILS + "?" + AppConstants.QueryString.ID + "={0}";
        ucProjectList.EditLinkText = "View Project";
        ucProjectList.DataBind();
    }
}